package file;

import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2025-02-27
 * Time: 11:56
 */
public class Demo3 {
    public static void main(String[] args) throws InterruptedException {
        File file = new File("./ text.txt");
        // file.delete(); 这个是立即删除
        file.deleteOnExit(); // 这个是等退出程序时删除
        Thread.sleep(5000);
    }
}
